package com.oocl.euc.authentication.core;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
@PropertySource(
        value = {"classpath:config/url-setting.properties"},
        ignoreResourceNotFound = true
)
@ConfigurationProperties(
        prefix = "sso",
        ignoreInvalidFields = true,
        ignoreUnknownFields = true
)
public class AuthUrlSetting {
    private String jwtAuthUrlPattern;

    private String SsoAuthUrlPattern;

    private List<String> SsoSkipUrlPatterns = new ArrayList<>();

    public String getJwtAuthUrlPattern() {
        return jwtAuthUrlPattern;
    }

    public void setJwtAuthUrlPattern(String jwtAuthUrlPattern) {
        this.jwtAuthUrlPattern = jwtAuthUrlPattern;
    }

    public String getSsoAuthUrlPattern() {
        return SsoAuthUrlPattern;
    }

    public void setSsoAuthUrlPattern(String ssoAuthUrlPattern) {
        SsoAuthUrlPattern = ssoAuthUrlPattern;
    }

    public List<String> getSsoSkipUrlPatterns() {
        return SsoSkipUrlPatterns;
    }

    public void setSsoSkipUrlPatterns(List<String> ssoSkipUrlPatterns) {
        SsoSkipUrlPatterns = ssoSkipUrlPatterns;
    }
}
